home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / AIncludes / Controls.a < prev    next >
Text File  |  1996-05-01  |  22KB  |  706 lines

  1. ;
  2. ;    File:        Controls.a
  3. ;
  4. ;    Contains:    Control Manager interfaces
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0d3 on Copland DR1
  8. ;
  9. ;    Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10. ;
  11. ;    Bugs?:        If you find a problem with this file, send the file and version
  12. ;                information (from above) and the problem description to:
  13. ;
  14. ;                    Internet:    apple.bugs@applelink.apple.com
  15. ;                    AppleLink:    APPLE.BUGS
  16. ;
  17. ;
  18.     IF &TYPE('__CONTROLS__') = 'UNDEFINED' THEN
  19. __CONTROLS__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  28.     include 'Menus.a'
  29.     ENDIF
  30.     IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
  31. ;
  32. ;_________________________________________________________________________________________________________
  33. ; * CONTROL DEFINITION ID'S
  34. ;_________________________________________________________________________________________________________
  35. ; Standard System 7 procID's
  36. ;
  37.  
  38. pushButProc                        EQU        0
  39. checkBoxProc                    EQU        1
  40. radioButProc                    EQU        2
  41. scrollBarProc                    EQU        16
  42. popupMenuProc                    EQU        1008
  43. ;
  44. ;_________________________________________________________________________________________________________
  45. ; * VARIANT CODES
  46. ;_________________________________________________________________________________________________________
  47. ;
  48. ; typedef SInt16                         ControlVariant
  49.  
  50.  
  51. kControlNoVariant                EQU        0                    ; No variant
  52. kControlUsesOwningWindowsFontVariant EQU $08                ; Control uses owning windows font to display text
  53. ;
  54. ;_________________________________________________________________________________________________________
  55. ; * CONTROL PART CODES
  56. ;_________________________________________________________________________________________________________
  57. ;
  58. ; typedef SInt16                         ControlPartCode
  59.  
  60.  
  61. kControlNoPart                    EQU        0
  62. kControlLabelPart                EQU        1
  63. kControlMenuPart                EQU        2
  64. kControlTrianglePart            EQU        4
  65. kControlButtonPart                EQU        10
  66. kControlCheckBoxPart            EQU        11
  67. kControlRadioButtonPart            EQU        11
  68. kControlUpButtonPart            EQU        20
  69. kControlDownButtonPart            EQU        21
  70. kControlPageUpPart                EQU        22
  71. kControlPageDownPart            EQU        23
  72. kControlIndicatorPart            EQU        129
  73. kControlDisabledPart            EQU        254
  74. kControlInactivePart            EQU        255
  75. ;
  76. ;_________________________________________________________________________________________________________
  77. ; * CHECK BOX VALUES
  78. ;_________________________________________________________________________________________________________
  79. ;
  80.  
  81. kControlCheckBoxUncheckedValue    EQU        0
  82. kControlCheckBoxCheckedValue    EQU        1
  83. kControlCheckBoxMixedValue        EQU        2
  84. ;
  85. ;_________________________________________________________________________________________________________
  86. ; * RADIO BUTTON VALUES
  87. ;_________________________________________________________________________________________________________
  88. ;
  89.  
  90. kControlRadioButtonUncheckedValue EQU    0
  91. kControlRadioButtonCheckedValue    EQU        1
  92. kControlRadioButtonMixedValue    EQU        2
  93. ;
  94. ;_________________________________________________________________________________________________________
  95. ; * CONTROL POP-UP MENU CONSTANTS
  96. ;_________________________________________________________________________________________________________
  97. ; Variant codes for the System 7 pop-up menu
  98. ;
  99.  
  100. popupFixedWidth                    EQU        $01
  101. popupVariableWidth                EQU        $02
  102. popupUseAddResMenu                EQU        $04
  103. popupUseWFont                    EQU        $08
  104. ;  Menu label styles for the System 7 pop-up menu 
  105.  
  106. popupTitleBold                    EQU        $0100
  107. popupTitleItalic                EQU        $0200
  108. popupTitleUnderline                EQU        $0400
  109. popupTitleOutline                EQU        $0800
  110. popupTitleShadow                EQU        $1000
  111. popupTitleCondense                EQU        $2000
  112. popupTitleExtend                EQU        $4000
  113. popupTitleNoStyle                EQU        $8000
  114. ;  Menu label justifications for the System 7 pop-up menu
  115.  
  116. popupTitleLeftJust                EQU        $00000000
  117. popupTitleCenterJust            EQU        $00000001
  118. popupTitleRightJust                EQU        $000000FF
  119. ;
  120. ;_________________________________________________________________________________________________________
  121. ; * CONTROL DRAGGRAYRGN CONSTANTS
  122. ;   For DragGrayRgnUPP used in TrackControl() 
  123. ;_________________________________________________________________________________________________________
  124. ;
  125.  
  126. noConstraint                    EQU        0
  127. hAxisOnly                        EQU        1
  128. vAxisOnly                        EQU        2
  129. ;
  130. ;_________________________________________________________________________________________________________
  131. ; * CONTROL COLOR TABLE PART CODES
  132. ;_________________________________________________________________________________________________________
  133. ;
  134.  
  135. cFrameColor                        EQU        0
  136. cBodyColor                        EQU        1
  137. cTextColor                        EQU        2
  138. cThumbColor                        EQU        3
  139. kNumberCtlCTabEntries            EQU        4
  140. ;
  141. ;_________________________________________________________________________________________________________
  142. ; * CONTROLHANDLE & CONTROLREF
  143. ;_________________________________________________________________________________________________________
  144. ;
  145.  
  146.  
  147. ; typedef ControlRecord *                ControlPtr
  148.  
  149. ; typedef ControlPtr *                    ControlHandle
  150.  
  151. ; typedef ControlHandle                 ControlRef
  152.  
  153. ;
  154. ;_________________________________________________________________________________________________________
  155. ; * CONTROL ACTIONPROC POINTER
  156. ;_________________________________________________________________________________________________________
  157. ;
  158. ;
  159. ;_________________________________________________________________________________________________________
  160. ; * CONTROL COLOR TABLE
  161. ;_________________________________________________________________________________________________________
  162. ;
  163. CtlCTab                    RECORD 0
  164. ccSeed                     ds.l    1                ; offset: $0 (0)
  165. ccRider                     ds.w    1                ; offset: $4 (4)
  166. ctSize                     ds.w    1                ; offset: $6 (6)
  167. ctTable                     ds.b    4 * ColorSpec.sizeof ; offset: $8 (8)
  168. sizeof                     EQU *                    ; size:   $28 (40)
  169.                         ENDR
  170. ; typedef struct CtlCTab *                CCTabPtr
  171.  
  172. ; typedef CCTabPtr *                    CCTabHandle
  173.  
  174. ;
  175. ;_________________________________________________________________________________________________________
  176. ; * CONTROL RECORD
  177. ;_________________________________________________________________________________________________________
  178. ;
  179. ControlRecord            RECORD 0
  180. nextControl                 ds.l    1                ; offset: $0 (0)
  181. contrlOwner                 ds.l    1                ; offset: $4 (4)
  182. contrlRect                 ds        Rect            ; offset: $8 (8)
  183. contrlVis                 ds.b    1                ; offset: $10 (16)
  184. contrlHilite             ds.b    1                ; offset: $11 (17)
  185. contrlValue                 ds.w    1                ; offset: $12 (18)
  186. contrlMin                 ds.w    1                ; offset: $14 (20)
  187. contrlMax                 ds.w    1                ; offset: $16 (22)
  188. contrlDefProc             ds.l    1                ; offset: $18 (24)
  189. contrlData                 ds.l    1                ; offset: $1C (28)
  190. contrlAction             ds.l    1                ; offset: $20 (32)
  191. contrlRfCon                 ds.l    1                ; offset: $24 (36)
  192. contrlTitle                 ds        Str255            ; offset: $28 (40)
  193. sizeof                     EQU *                    ; size:   $128 (296)
  194.                         ENDR
  195. ;
  196. ;_________________________________________________________________________________________________________
  197. ; * AUXILLARY CONTROL RECORD STRUCTURE
  198. ;_________________________________________________________________________________________________________
  199. ;
  200. AuxCtlRec                RECORD 0
  201. acNext                     ds.l    1                ; offset: $0 (0)
  202. acOwner                     ds.l    1                ; offset: $4 (4)
  203. acCTable                 ds.l    1                ; offset: $8 (8)
  204. acFlags                     ds.w    1                ; offset: $C (12)
  205. acReserved                 ds.l    1                ; offset: $E (14)
  206. acRefCon                 ds.l    1                ; offset: $12 (18)
  207. sizeof                     EQU *                    ; size:   $16 (22)
  208.                         ENDR
  209. ; typedef struct AuxCtlRec *            AuxCtlPtr
  210.  
  211. ; typedef AuxCtlPtr *                    AuxCtlHandle
  212.  
  213. ;
  214. ;_________________________________________________________________________________________________________
  215. ; * POP-UP MENU PRIVATE DATA STRUCTURE
  216. ;_________________________________________________________________________________________________________
  217. ;
  218. PopupPrivateData        RECORD 0
  219. mHandle                     ds.l    1                ; offset: $0 (0)
  220. mID                         ds.w    1                ; offset: $4 (4)
  221. sizeof                     EQU *                    ; size:   $6 (6)
  222.                         ENDR
  223. ; typedef struct PopupPrivateData *        PopupPrivateDataPtr
  224.  
  225. ; typedef PopupPrivateDataPtr *            PopupPrivateDataHandle
  226.  
  227. ;
  228. ;_________________________________________________________________________________________________________
  229. ; * CONTROL ACTION PROC UPP'S
  230. ;_________________________________________________________________________________________________________
  231. ;
  232. ;
  233. ;_________________________________________________________________________________________________________
  234. ;    
  235. ; * CONTROL CREATION / DELETION API'S
  236. ;_________________________________________________________________________________________________________
  237. ;
  238. ;
  239. ; pascal ControlHandle NewControl(WindowPtr owningWindow, const Rect *boundsRect, ConstStr255Param controlTitle, Boolean initiallyVisible, SInt16 initialValue, SInt16 minimumValue, SInt16 maximumValue, SInt16 procID, SInt32 controlReference)
  240. ;
  241.     IF ¨ GENERATINGCFM THEN
  242.         _NewControl:    OPWORD    $A954
  243.     ELSE
  244.         IMPORT_CFM_FUNCTION NewControl
  245.     ENDIF
  246.  
  247. ;
  248. ; pascal ControlHandle GetNewControl(SInt16 resourceID, WindowPtr owningWindow)
  249. ;
  250.     IF ¨ GENERATINGCFM THEN
  251.         _GetNewControl:    OPWORD    $A9BE
  252.     ELSE
  253.         IMPORT_CFM_FUNCTION GetNewControl
  254.     ENDIF
  255.  
  256. ;
  257. ; pascal void DisposeControl(ControlHandle theControl)
  258. ;
  259.     IF ¨ GENERATINGCFM THEN
  260.         _DisposeControl:    OPWORD    $A955
  261.     ELSE
  262.         IMPORT_CFM_FUNCTION DisposeControl
  263.     ENDIF
  264.  
  265. ;
  266. ; pascal void KillControls(WindowPtr theWindow)
  267. ;
  268.     IF ¨ GENERATINGCFM THEN
  269.         _KillControls:    OPWORD    $A956
  270.     ELSE
  271.         IMPORT_CFM_FUNCTION KillControls
  272.     ENDIF
  273.  
  274. ;
  275. ;_________________________________________________________________________________________________________
  276. ;    
  277. ; * CONTROL SHOWING/HIDING API'S
  278. ;_________________________________________________________________________________________________________
  279. ;
  280. ;
  281. ; pascal void ShowControl(ControlHandle theControl)
  282. ;
  283.     IF ¨ GENERATINGCFM THEN
  284.         _ShowControl:    OPWORD    $A957
  285.     ELSE
  286.         IMPORT_CFM_FUNCTION ShowControl
  287.     ENDIF
  288.  
  289. ;
  290. ; pascal void HideControl(ControlHandle theControl)
  291. ;
  292.     IF ¨ GENERATINGCFM THEN
  293.         _HideControl:    OPWORD    $A958
  294.     ELSE
  295.         IMPORT_CFM_FUNCTION HideControl
  296.     ENDIF
  297.  
  298. ;
  299. ;_________________________________________________________________________________________________________
  300. ;    
  301. ; * CONTROL DRAWING API'S
  302. ;_________________________________________________________________________________________________________
  303. ;
  304. ;
  305. ; pascal void DrawControls(WindowPtr theWindow)
  306. ;
  307.     IF ¨ GENERATINGCFM THEN
  308.         _DrawControls:    OPWORD    $A969
  309.     ELSE
  310.         IMPORT_CFM_FUNCTION DrawControls
  311.     ENDIF
  312.  
  313. ;
  314. ; pascal void Draw1Control(ControlHandle theControl)
  315. ;
  316.     IF ¨ GENERATINGCFM THEN
  317.         _Draw1Control:    OPWORD    $A96D
  318.     ELSE
  319.         IMPORT_CFM_FUNCTION Draw1Control
  320.     ENDIF
  321.  
  322. ;
  323. ; pascal void UpdateControls(WindowPtr theWindow, RgnHandle updateRegion)
  324. ;
  325.     IF ¨ GENERATINGCFM THEN
  326.         _UpdateControls:    OPWORD    $A953
  327.     ELSE
  328.         IMPORT_CFM_FUNCTION UpdateControls
  329.     ENDIF
  330.  
  331. ;
  332. ;_________________________________________________________________________________________________________
  333. ;    
  334. ; * CONTROL HIGHLIGHT API'S
  335. ;_________________________________________________________________________________________________________
  336. ;
  337. ;
  338. ; pascal void HiliteControl(ControlHandle theControl, ControlPartCode hiliteState)
  339. ;
  340.     IF ¨ GENERATINGCFM THEN
  341.         _HiliteControl:    OPWORD    $A95D
  342.     ELSE
  343.         IMPORT_CFM_FUNCTION HiliteControl
  344.     ENDIF
  345.  
  346. ;
  347. ;_________________________________________________________________________________________________________
  348. ;    
  349. ; * CONTROL TRACKING/DRAGGING API'S
  350. ;_________________________________________________________________________________________________________
  351. ;    When using the TrackControl() call when tracking an indicator, the actionProc parameter (type ControlActionUPP) 
  352. ;  should be replaced by a parameter of type DragGrayRgnUPP (see Quickdraw.h).
  353. ;
  354. ;
  355. ; pascal ControlPartCode TrackControl(ControlHandle theControl, Point startPoint, ControlActionUPP actionProc)
  356. ;
  357.     IF ¨ GENERATINGCFM THEN
  358.         _TrackControl:    OPWORD    $A968
  359.     ELSE
  360.         IMPORT_CFM_FUNCTION TrackControl
  361.     ENDIF
  362.  
  363. ;
  364. ; pascal void DragControl(ControlHandle theControl, Point startPoint, const Rect *limitRect, const Rect *slopRect, DragConstraint axis)
  365. ;
  366.     IF ¨ GENERATINGCFM THEN
  367.         _DragControl:    OPWORD    $A967
  368.     ELSE
  369.         IMPORT_CFM_FUNCTION DragControl
  370.     ENDIF
  371.  
  372. ;
  373. ; pascal ControlPartCode TestControl(ControlHandle theControl, Point testPoint)
  374. ;
  375.     IF ¨ GENERATINGCFM THEN
  376.         _TestControl:    OPWORD    $A966
  377.     ELSE
  378.         IMPORT_CFM_FUNCTION TestControl
  379.     ENDIF
  380.  
  381. ;
  382. ; pascal ControlPartCode FindControl(Point testPoint, WindowPtr theWindow, ControlHandle *theControl)
  383. ;
  384.     IF ¨ GENERATINGCFM THEN
  385.         _FindControl:    OPWORD    $A96C
  386.     ELSE
  387.         IMPORT_CFM_FUNCTION FindControl
  388.     ENDIF
  389.  
  390. ;
  391. ;_________________________________________________________________________________________________________
  392. ;    
  393. ; * CONTROL MOVING/SIZING API'S
  394. ;_________________________________________________________________________________________________________
  395. ;
  396. ;
  397. ; pascal void MoveControl(ControlHandle theControl, SInt16 h, SInt16 v)
  398. ;
  399.     IF ¨ GENERATINGCFM THEN
  400.         _MoveControl:    OPWORD    $A959
  401.     ELSE
  402.         IMPORT_CFM_FUNCTION MoveControl
  403.     ENDIF
  404.  
  405. ;
  406. ; pascal void SizeControl(ControlHandle theControl, SInt16 w, SInt16 h)
  407. ;
  408.     IF ¨ GENERATINGCFM THEN
  409.         _SizeControl:    OPWORD    $A95C
  410.     ELSE
  411.         IMPORT_CFM_FUNCTION SizeControl
  412.     ENDIF
  413.  
  414. ;
  415. ;_________________________________________________________________________________________________________
  416. ;    
  417. ; * CONTROL TITLE API'S
  418. ;_________________________________________________________________________________________________________
  419. ;
  420. ;
  421. ; pascal void SetControlTitle(ControlHandle theControl, ConstStr255Param title)
  422. ;
  423.     IF ¨ GENERATINGCFM THEN
  424.         _SetControlTitle:    OPWORD    $A95F
  425.     ELSE
  426.         IMPORT_CFM_FUNCTION SetControlTitle
  427.     ENDIF
  428.  
  429. ;
  430. ; pascal void GetControlTitle(ControlHandle theControl, Str255 title)
  431. ;
  432.     IF ¨ GENERATINGCFM THEN
  433.         _GetControlTitle:    OPWORD    $A95E
  434.     ELSE
  435.         IMPORT_CFM_FUNCTION GetControlTitle
  436.     ENDIF
  437.  
  438. ;
  439. ;_________________________________________________________________________________________________________
  440. ;    
  441. ; * CONTROL VALUE, MIMIMUM, AND MAXIMUM API'S
  442. ;_________________________________________________________________________________________________________
  443. ;
  444. ;
  445. ; pascal SInt16 GetControlValue(ControlHandle theControl)
  446. ;
  447.     IF ¨ GENERATINGCFM THEN
  448.         _GetControlValue:    OPWORD    $A960
  449.     ELSE
  450.         IMPORT_CFM_FUNCTION GetControlValue
  451.     ENDIF
  452.  
  453. ;
  454. ; pascal void SetControlValue(ControlHandle theControl, SInt16 newValue)
  455. ;
  456.     IF ¨ GENERATINGCFM THEN
  457.         _SetControlValue:    OPWORD    $A963
  458.     ELSE
  459.         IMPORT_CFM_FUNCTION SetControlValue
  460.     ENDIF
  461.  
  462. ;
  463. ; pascal SInt16 GetControlMinimum(ControlHandle theControl)
  464. ;
  465.     IF ¨ GENERATINGCFM THEN
  466.         _GetControlMinimum:    OPWORD    $A961
  467.     ELSE
  468.         IMPORT_CFM_FUNCTION GetControlMinimum
  469.     ENDIF
  470.  
  471. ;
  472. ; pascal void SetControlMinimum(ControlHandle theControl, SInt16 newMinimum)
  473. ;
  474.     IF ¨ GENERATINGCFM THEN
  475.         _SetControlMinimum:    OPWORD    $A964
  476.     ELSE
  477.         IMPORT_CFM_FUNCTION SetControlMinimum
  478.     ENDIF
  479.  
  480. ;
  481. ; pascal SInt16 GetControlMaximum(ControlHandle theControl)
  482. ;
  483.     IF ¨ GENERATINGCFM THEN
  484.         _GetControlMaximum:    OPWORD    $A962
  485.     ELSE
  486.         IMPORT_CFM_FUNCTION GetControlMaximum
  487.     ENDIF
  488.  
  489. ;
  490. ; pascal void SetControlMaximum(ControlHandle theControl, SInt16 newMaximum)
  491. ;
  492.     IF ¨ GENERATINGCFM THEN
  493.         _SetControlMaximum:    OPWORD    $A965
  494.     ELSE
  495.         IMPORT_CFM_FUNCTION SetControlMaximum
  496.     ENDIF
  497.  
  498. ;
  499. ;_________________________________________________________________________________________________________
  500. ;    
  501. ; * CONTROL VARIANT AND WINDOW INFORMATION API'S
  502. ;_________________________________________________________________________________________________________
  503. ;
  504. ;
  505. ; pascal ControlVariant GetControlVariant(ControlHandle theControl)
  506. ;
  507.     IF ¨ GENERATINGCFM THEN
  508.         _GetControlVariant:    OPWORD    $A809
  509.     ELSE
  510.         IMPORT_CFM_FUNCTION GetControlVariant
  511.     ENDIF
  512.  
  513. ;
  514. ;_________________________________________________________________________________________________________
  515. ;    
  516. ; * CONTROL ACTION PROC API'S
  517. ;_________________________________________________________________________________________________________
  518. ;
  519. ;
  520. ; pascal void SetControlAction(ControlHandle theControl, ControlActionUPP actionProc)
  521. ;
  522.     IF ¨ GENERATINGCFM THEN
  523.         _SetControlAction:    OPWORD    $A96B
  524.     ELSE
  525.         IMPORT_CFM_FUNCTION SetControlAction
  526.     ENDIF
  527.  
  528. ;
  529. ; pascal ControlActionUPP GetControlAction(ControlHandle theControl)
  530. ;
  531.     IF ¨ GENERATINGCFM THEN
  532.         _GetControlAction:    OPWORD    $A96A
  533.     ELSE
  534.         IMPORT_CFM_FUNCTION GetControlAction
  535.     ENDIF
  536.  
  537. ;
  538. ;_________________________________________________________________________________________________________
  539. ;    
  540. ; * CONTROL ACCESSOR API'S
  541. ;_________________________________________________________________________________________________________
  542. ;
  543. ;
  544. ; pascal void SetControlReference(ControlHandle theControl, SInt32 data)
  545. ;
  546.     IF ¨ GENERATINGCFM THEN
  547.         _SetControlReference:    OPWORD    $A95B
  548.     ELSE
  549.         IMPORT_CFM_FUNCTION SetControlReference
  550.     ENDIF
  551.  
  552. ;
  553. ; pascal SInt32 GetControlReference(ControlHandle theControl)
  554. ;
  555.     IF ¨ GENERATINGCFM THEN
  556.         _GetControlReference:    OPWORD    $A95A
  557.     ELSE
  558.         IMPORT_CFM_FUNCTION GetControlReference
  559.     ENDIF
  560.  
  561. ;
  562. ; pascal Boolean GetAuxiliaryControlRecord(ControlHandle theControl, AuxCtlHandle *acHndl)
  563. ;
  564.     IF ¨ GENERATINGCFM THEN
  565.         _GetAuxiliaryControlRecord:    OPWORD    $AA44
  566.     ELSE
  567.         IMPORT_CFM_FUNCTION GetAuxiliaryControlRecord
  568.     ENDIF
  569.  
  570. ;
  571. ; pascal void SetControlColor(ControlHandle theControl, CCTabHandle newColorTable)
  572. ;
  573.     IF ¨ GENERATINGCFM THEN
  574.         _SetControlColor:    OPWORD    $AA43
  575.     ELSE
  576.         IMPORT_CFM_FUNCTION SetControlColor
  577.     ENDIF
  578.  
  579. ;
  580. ;_________________________________________________________________________________________________________
  581. ;    
  582. ; * VALID 'CDEF' MESSAGES
  583. ;_________________________________________________________________________________________________________
  584. ;
  585. ; typedef SInt16                         ControlDefProcMessage
  586.  
  587.  
  588. drawCntl                        EQU        0
  589. testCntl                        EQU        1
  590. calcCRgns                        EQU        2
  591. initCntl                        EQU        3
  592. dispCntl                        EQU        4
  593. posCntl                            EQU        5
  594. thumbCntl                        EQU        6
  595. dragCntl                        EQU        7
  596. autoTrack                        EQU        8
  597. calcCntlRgn                        EQU        10
  598. calcThumbRgn                    EQU        11
  599. drawThumbOutline                EQU        12
  600. ;
  601. ;_________________________________________________________________________________________________________
  602. ;    
  603. ; * MAIN ENTRY POINT FOR 'CDEF'
  604. ;_________________________________________________________________________________________________________
  605. ;
  606. ;
  607. ;_________________________________________________________________________________________________________
  608. ;    
  609. ; * CONSTANTS FOR DRAWCNTL MESSAGE PASSED IN PARAM
  610. ;_________________________________________________________________________________________________________
  611. ;
  612.  
  613. kDrawControlEntireControl        EQU        0
  614. kDrawControlIndicatorOnly        EQU        129
  615. ;
  616. ;_________________________________________________________________________________________________________
  617. ;    
  618. ; * CONSTANTS FOR DRAGCNTL MESSAGE PASSED IN PARAM
  619. ;_________________________________________________________________________________________________________
  620. ;
  621.  
  622. kDragControlEntireControl        EQU        0
  623. kDragControlIndicator            EQU        1
  624. ;
  625. ;_________________________________________________________________________________________________________
  626. ;    
  627. ; * DRAG CONSTRAINT STRUCTURE PASSED IN PARAM FOR THUMBCNTL MESSAGE (IM I-332)
  628. ;_________________________________________________________________________________________________________
  629. ;
  630. IndicatorDragConstraint    RECORD 0
  631. limitRect                 ds        Rect            ; offset: $0 (0)
  632. slopRect                 ds        Rect            ; offset: $8 (8)
  633. axis                     ds.w    1                ; offset: $10 (16)
  634. sizeof                     EQU *                    ; size:   $12 (18)
  635.                         ENDR
  636. ; typedef struct IndicatorDragConstraint * IndicatorDragConstraintPtr
  637.  
  638. ; typedef IndicatorDragConstraintPtr *    IndicatorDragConstraintHandle
  639.  
  640.     IF OLDROUTINENAMES THEN
  641. ;
  642. ;_________________________________________________________________________________________________________
  643. ; * OLDROUTINENAMES
  644. ;_________________________________________________________________________________________________________
  645. ; Variants applicable to all controls (at least ones with text)
  646. ;
  647.  
  648. useWFont                        EQU        8
  649.  
  650. inLabel                            EQU        1
  651. inMenu                            EQU        2
  652. inTriangle                        EQU        4
  653. inButton                        EQU        10
  654. inCheckBox                        EQU        11
  655. inUpButton                        EQU        20
  656. inDownButton                    EQU        21
  657. inPageUp                        EQU        22
  658. inPageDown                        EQU        23
  659. inThumb                            EQU        129
  660.  
  661. kNoHiliteControlPart            EQU        0
  662. kInLabelControlPart                EQU        1
  663. kInMenuControlPart                EQU        2
  664. kInTriangleControlPart            EQU        4
  665. kInButtonControlPart            EQU        10
  666. kInCheckBoxControlPart            EQU        11
  667. kInUpButtonControlPart            EQU        20
  668. kInDownButtonControlPart        EQU        21
  669. kInPageUpControlPart            EQU        22
  670. kInPageDownControlPart            EQU        23
  671. kInIndicatorControlPart            EQU        129
  672. kReservedControlPart            EQU        254
  673. kControlInactiveControlPart        EQU        255
  674.     ENDIF
  675. ;
  676. ;*****************************************************************************
  677. ;*                                                                           *
  678. ;* The conditional STRICT_CONTROLS has been removed from this interface file.*
  679. ;* The accessor macros to a ControlRecord are no longer necessary.           *
  680. ;*                                                                           *
  681. ;*****************************************************************************
  682. ;
  683. ;Details:
  684. ;The original purpose of the STRICT_ conditionals and accessor macros was to
  685. ;help ease the transition to Copland.   Shared data structures are difficult
  686. ;to coordinate in a preemptive multitasking OS.  By hiding the fields in a
  687. ;WindowRecord and other data structures, we would begin the migration to 
  688. ;system data structures being completely hidden from applications. 
  689. ;
  690. ;After many design reviews, it was finally concluded that with this sort of
  691. ;migration, the system could never tell when an application was no longer 
  692. ;peeking at a WindowRecord, and thus the data structure might never become 
  693. ;system owned.  Additionally, there were many other limitations in the classic
  694. ;toolbox that were begging to be addressed.
  695. ;
  696. ;The final decision was to leave the traditional toolbox as a compatibility mode.
  697. ;The preferred toolbox API for Copland is a new SOM(tm) based architecture 
  698. ;(e.g. HIWindows.idl).  Windows, menu, controls, etc are each a SOM object 
  699. ;with methods for drawing, event handling, and customization.
  700. ;
  701. ;
  702.     ENDIF
  703.     ENDIF ; __CONTROLS__ 
  704.  
  705.